// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Data/MissionStruct.h"
#include "UserWidget/WidgetComponent/SingleHintWidget.h"
#include "SingleObjectiveHintWidget.generated.h"


UCLASS()
class MISCELLANEOUSPROJECT_API USingleObjectiveHintWidget : public UUserWidget
{
	GENERATED_BODY()
public:
	virtual void NativeOnInitialized() override;
	virtual void NativeConstruct() override;
public:
	void ConstructWidget(FText ObjectiveText, FHintBase Hints, TSubclassOf<USingleHintWidget> HintWidget);
	void UpdateTextColor(bool Completed);
private:
	void DelayLater(bool Completed);
public:
	UPROPERTY(meta = (BindWidget))
	class UVerticalBox* ListBox;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* ObjectiveTitle;
	UPROPERTY(meta = (BindWidget))
	class UBorder* ObjectiveIcon;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	FText ObjectiveText;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	FHintBase Hints;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	TSubclassOf<USingleHintWidget> HintWidget;
	FLinearColor TextColor;
private:
	FTimerHandle TimerHandle;
};
